package com.cedifie.lendapp.ui.user.impl

import com.cedifie.http.callback.StringCallback
import com.cedifie.lendapp.http.ApiService
import com.cedifie.lendapp.http.HttpHelper
import com.cedifie.lendapp.http.IHttpCallback
import org.json.JSONObject

/**
 * Cedifie
 * @Author wwdeng
 * @CreateTime: 2024/6/14 16:26
 * @Annotation：意见反馈 Model 实现
 */
class CedUserFeedbackModelImpl {

    /**
     * 上传图片
     */
    fun uploadCedImageAction(imgPath: String,callback: StringCallback){
        val httpUrl = ApiService.getHttpUrl(ApiService.API_URL.CED_API_UPLOAD_FILE_URL)
        HttpHelper.uploadCedFileAction(httpUrl,imgPath,callback)
    }

    /**
     * 提交反馈
     */
    fun submitCedFeedbackAction(params: JSONObject,callback: IHttpCallback){
        val httpUrl = ApiService.getHttpUrl(ApiService.API_URL.CED_API_COMMON_URL)
        HttpHelper.postCedAction(httpUrl,params,callback)
    }
}